<!DOCTYPE html>
<title>Test that a single valid "source" element loads correctly.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<video></video>
<script>
async_test(function(t) {
    var video = document.querySelector("video");

    // The first source should load.
    var source = document.createElement("source");
    source.src = "content/test.ogv";;
    video.appendChild(source);

    // The second source is bogus and won't load, but it should never be processed.
    source = document.createElement("source");
    source.src = "content/does-not-exist";
    source.onerror = t.unreached_func();
    video.appendChild(source);

    video.onloadedmetadata = t.step_func_done();
});
</script>